import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'


import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 引入elementplus的icon图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue"

import {ElImage} from "element-plus"


// 1. 引入你需要的组件
import { Button } from 'vant';
// 2. 引入组件样式
import 'vant/lib/index.css';

import { Tab, Tabs,Icon,Popup,Cell, CellGroup,Tabbar, TabbarItem } from 'vant'

const app = createApp(App);//确保 _use_ 路由实例使整个应用支持路由。


// 循环引入elementIcon的组件
for (const [key,component] of Object.entries(ElementPlusIconsVue)){
    app.component(key,component)
}

app.use(router);// 挂载router,完成

app.use(Button);




app.use(ElementPlus)
app.use(ElImage)


// vant
app.use(Cell);
app.use(CellGroup);
app.use(Popup);
app.use(Tabs);
app.use(Icon);
app.use(Tab);
app.use(Tabbar);
app.use(TabbarItem);

app.mount('#app');

// createApp(App).mount('#app')
